package com.huatai.saas.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 场景列表
 * @TableName scene_file
 */
@TableName(value ="scene_file")
@Data
@ApiModel(value = "场景列表", description = "场景列表")
public class SceneFileEntity implements Serializable {
	private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 文件名
     */
	@ApiModelProperty(value = "场景名称",required = true)
	@TableField("file_name")
	@NotBlank(message = "场景名称不能为空")
    private String fileName;

    /**
     * 唯一标识,MD5
     */
	@ApiModelProperty(value = "唯一标识,MD5")
    private String identifier;

    /**
     * 本地地址
     */
	@ApiModelProperty(value = "本地地址")
    private String path;

//	@ApiModelProperty(value = "场景图片地址")
//	private String picturePath;

    /**
     * 文件总大小
     */
	@ApiModelProperty(value = "文件总大小")
    private Long totalSize;

    /**
     * 创建时间
     */
	@ApiModelProperty(value = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
	@ApiModelProperty(value = "更新时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 版本号(V1.0.1)
     */
	@ApiModelProperty(value = "版本号v1")
    private String version;

    /**
     * 版本描述
     */
	@ApiModelProperty(value = "版本描述",required = true)
	@NotBlank(message = "版本描述不能为空")
    private String description;

	@ApiModelProperty(value = "场景内部唯一标识",required = true)
	@TableField("open_id")
//	@NotBlank(message = "场景内部唯一标识不能为空")
	private String openId;

	@ApiModelProperty("行业")
	@TableField("industry_key")
	private String industryKey;

	/**
	 * 逻辑删除
	 */
	@TableLogic
	@TableField(value = "is_deleted")
	private Integer isDeleted;

	@ApiModelProperty(value = "场景文件状态(1.正常，0异常)")
	@TableField(value = "status")
	private Integer status;

	@ApiModelProperty(value = "底板价格")
	private BigDecimal price;

	@ApiModelProperty(value = "图片可访问地址")
	@TableField(exist = false)
	private String pictureUrl;

	@TableField(exist = false)
	@ApiModelProperty(value = "是否存在文件")
	private Boolean isScene;
}
